package network;

import java.net.InetAddress;
import java.net.UnknownHostException;

/**
 * Created with IntelliJ IDEA.
 * User: leep
 * Date: 15-6-4
 * Time: 上午10:58
 * To change this template use File | Settings | File Templates.
 */
public class Main {
	public static void main(String[] args) throws UnknownHostException {
		InetAddress addr = InetAddress.getLocalHost();
		/**返回 IP 地址字符串（以文本表现形式）*/
		String ip = addr.getHostAddress();
		System.out.println(ip);
	}
}
